<!DOCTYPE html>
<html lang="zh" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('mis列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>2：</label>
                            <input name="a2" type="text"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:mis:add">
                <i class="fa fa-plus"></i> 添加
            </a>
            <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:mis:edit">
                <i class="fa fa-edit"></i> 修改
            </a>
            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
               shiro:hasPermission="system:mis:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:mis:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:mis:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:mis:remove')}]];
    var prefix = ctx + "system/mis";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "mis",
            columns: [{
                checkbox: true
            },
                {
                    field: 'a1',
                    title: '1',
                    visible: false
                },
                {
                    field: 'a2',
                    title: '2'
                },
                {
                    field: 'a3',
                    title: '3'
                },
                {
                    field: 'a4',
                    title: '4'
                },
                {
                    field: 'a5',
                    title: '5'
                },
                {
                    field: 'a6',
                    title: '6'
                },
                {
                    field: 'a7',
                    title: '7'
                },
                {
                    field: 'a8',
                    title: '8'
                },
                {
                    field: 'a9',
                    title: '9'
                },
                {
                    field: 'a10',
                    title: '10'
                },
                {
                    field: 'a11',
                    title: '11'
                },
                {
                    field: 'a12',
                    title: '12'
                },
                {
                    field: 'a13',
                    title: '13'
                },
                {
                    field: 'a14',
                    title: '14'
                },
                {
                    field: 'a15',
                    title: '15'
                },
                {
                    field: 'a16',
                    title: '16'
                },
                {
                    field: 'a17',
                    title: '17'
                },
                {
                    field: 'a18',
                    title: '18'
                },
                {
                    field: 'a19',
                    title: '19'
                },
                {
                    field: 'a20',
                    title: '20'
                },
                {
                    field: 'a21',
                    title: '21'
                },
                {
                    field: 'a22',
                    title: '22'
                },
                {
                    field: 'a23',
                    title: '23'
                },
                {
                    field: 'a24',
                    title: '24'
                },
                {
                    field: 'a25',
                    title: '25'
                },
                {
                    field: 'a26',
                    title: '26'
                },
                {
                    field: 'a27',
                    title: '27'
                },
                {
                    field: 'a28',
                    title: '28'
                },
                {
                    field: 'a29',
                    title: '29'
                },
                {
                    field: 'a30',
                    title: '30'
                },
                {
                    field: 'a31',
                    title: '31'
                },
                {
                    field: 'a32',
                    title: '32'
                },
                {
                    field: 'a33',
                    title: '33'
                },
                {
                    field: 'a34',
                    title: '34'
                },
                {
                    field: 'a35',
                    title: '35'
                },
                {
                    field: 'a36',
                    title: '36'
                },
                {
                    field: 'a37',
                    title: '37'
                },
                {
                    field: 'a38',
                    title: '38'
                },
                {
                    field: 'a39',
                    title: '39'
                },
                {
                    field: 'a40',
                    title: '40'
                },
                {
                    field: 'a41',
                    title: '41'
                },
                {
                    field: 'a42',
                    title: '42'
                },
                {
                    field: 'a43',
                    title: '43'
                },
                {
                    field: 'a44',
                    title: '44'
                },
                {
                    field: 'a45',
                    title: '45'
                },
                {
                    field: 'a46',
                    title: '46'
                },
                {
                    field: 'a47',
                    title: '47'
                },
                {
                    field: 'a48',
                    title: '48'
                },
                {
                    field: 'a49',
                    title: '49'
                },
                {
                    field: 'a50',
                    title: '50'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.a1 + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.a1 + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>